let arr = ['a', 'b', 'c', 'd', 'e']

Array.prototype.my_findIndex = function(cb) {
  for (let i = 0; i < this.length; i++) {
    if(cb(this[i], i, this)) return this[i]
  }
  return undefined
}

arr.find((item, index, arr) => {
  return item === 'c'
})